// 引入react
import React from 'react'
class HandleClick extends React.Component{
    handleClick (e) {
        console.log(e);
        // 阻止默认行为
        e.preventDefault();
    }
   render() {
    return <a href='http://itcast.cn' onClick={this.handleClick}>点我不会跳转页面</a>
   }
}

export default HandleClick